package com.fengmi.cms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fengmi.cms.Content;
import com.fengmi.cms.mapper.ContentMapper;
import com.fengmi.cms.service.IContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhuxm
 * @since 2021-10-14
 */
@Service
public class ContentServiceImpl extends ServiceImpl<ContentMapper, Content> implements IContentService {


    @Override
    public List<Content> findContentListByTpid(String tpId) {
        QueryWrapper<Content> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("category_id",tpId);
        return this.baseMapper.selectList(queryWrapper);
    }
}
